﻿/*
 
Celerity: Sensory Overload
Copright 2012 by Adam Hill, David Gannon, Thomas Tamblyn & Patrick Ytting
Contact: adam.hill@outlook.com
Website: adamhill.org
Licence: MS-Pl Licence
  
 */

using Celerity.ColourPalette;
using Celerity.Content;
using Celerity.Data;
using Celerity.Entities;
using Microsoft.Xna.Framework;
using System.Collections.Generic;

namespace Celerity.UI.Definition.Controls
{
    public class AboutDevsControl : UIEntity
    {
        public override void ConfigureSelf()
        {
            const int startY = 45;
            const int x = 75;
            const int gap = 75;
            const int line2Offset = 25;
            const int line3Offset = 43;

            DrawCondition = new UIDrawCondition
            {
                CheckGameState = true,
                CheckedGameStates = new List<GameState>
                        {
                            GameState.Menu
                        },
                CheckMenuState = true,
                CheckedMenuStates = new List<MenuState>
                        {
                            MenuState.MainMenu
                        },
            };
            Items = new List<UIEntityItem>
                    {
                        new UIEntityItem // Background
                        {
                            Size = this.Size,
                            Offset = this.Offset,
                            ImageDefault = ImageLibrary.TextureGrey,
                            ImagePressed = ImageLibrary.TextureGrey,
                        },

                        new UIEntityItem // Image
                        {
                            Size = this.Size,
                            Offset = this.Offset,
                            ImageDefault = ImageLibrary.CreatorPortraits,
                            ImagePressed = ImageLibrary.CreatorPortraits
                        },


                        
                        new UIEntityItem // A Text
                        {
                            Size = this.Size,
                            Offset = this.Offset + new Vector2(x, startY),
                            Font = FontLibrary.Standard,
                            FontColorDefault = Palette.White,
                            FontColorPressed = Palette.White,
                            Text = ResxText.DevA
                        },
                        new UIEntityItem // D Text
                        {
                            Size = this.Size,
                            Offset = this.Offset + new Vector2(x, startY + gap),
                            Font = FontLibrary.Standard,
                            FontColorDefault = Palette.White,
                            FontColorPressed = Palette.White,
                            Text = ResxText.DevD
                        },
                        new UIEntityItem // T Text
                        {
                            Size = this.Size,
                            Offset = this.Offset + new Vector2(x, startY + (gap * 2)),
                            Font = FontLibrary.Standard,
                            FontColorDefault = Palette.White,
                            FontColorPressed = Palette.White,
                            Text = ResxText.DevT
                        },
                        new UIEntityItem // P Text
                        {
                            Size = this.Size,
                            Offset = this.Offset + new Vector2(x, startY + (gap * 3)),
                            Font = FontLibrary.Standard,
                            FontColorDefault = Palette.White,
                            FontColorPressed = Palette.White,
                            Text = ResxText.DevP
                        },


                        // Line 2...
                        new UIEntityItem // A Text
                        {
                            Size = this.Size,
                            Offset = this.Offset + new Vector2(x, startY + line2Offset),
                            Font = FontLibrary.Body,
                            FontColorDefault = Palette.Black,
                            FontColorPressed = Palette.Black,
                            Text = ResxText.DevA2
                        },
                        new UIEntityItem // D Text
                        {
                            Size = this.Size,
                            Offset = this.Offset + new Vector2(x, startY + gap + line2Offset),
                            Font = FontLibrary.Body,
                            FontColorDefault = Palette.Black,
                            FontColorPressed = Palette.Black,
                            Text = ResxText.DevD2
                        },
                        new UIEntityItem // T Text
                        {
                            Size = this.Size,
                            Offset = this.Offset + new Vector2(x, startY + (gap * 2) + line2Offset),
                            Font = FontLibrary.Body,
                            FontColorDefault = Palette.Black,
                            FontColorPressed = Palette.Black,
                            Text = ResxText.DevT2
                        },
                        new UIEntityItem // P Text
                        {
                            Size = this.Size,
                            Offset = this.Offset + new Vector2(x, startY + (gap * 3) + line2Offset),
                            Font = FontLibrary.Body,
                            FontColorDefault = Palette.Black,
                            FontColorPressed = Palette.Black,
                            Text = ResxText.DevP2
                        },

                        // Line 3...
                        new UIEntityItem // A Text
                        {
                            Size = this.Size,
                            Offset = this.Offset + new Vector2(x, startY + line3Offset),
                            Font = FontLibrary.Body,
                            FontColorDefault = Palette.Black,
                            FontColorPressed = Palette.Black,
                            Text = ResxText.DevA3
                        },
                        new UIEntityItem // D Text
                        {
                            Size = this.Size,
                            Offset = this.Offset + new Vector2(x, startY + gap + line3Offset),
                            Font = FontLibrary.Body,
                            FontColorDefault = Palette.Black,
                            FontColorPressed = Palette.Black,
                            Text = ResxText.DevD3
                        },
                        new UIEntityItem // T Text
                        {
                            Size = this.Size,
                            Offset = this.Offset + new Vector2(x, startY + (gap * 2) + line3Offset),
                            Font = FontLibrary.Body,
                            FontColorDefault = Palette.Black,
                            FontColorPressed = Palette.Black,
                            Text = ResxText.DevT3
                        },
                        new UIEntityItem // P Text
                        {
                            Size = this.Size,
                            Offset = this.Offset + new Vector2(x, startY + (gap * 3) + line3Offset),
                            Font = FontLibrary.Body,
                            FontColorDefault = Palette.Black,
                            FontColorPressed = Palette.Black,
                            Text = ResxText.DevP3
                        },





                        new UIEntityItem // Title Text
                        {
                            ApplyCentring = true,
                            Size = this.Size,
                            Offset = this.Offset,// + UIGeometry.PanelTextOffset,
                            Font = FontLibrary.Heading,
                            FontColorDefault = Palette.White,
                            FontColorPressed = Palette.White,
                            Text = ResxText.AboutDevsTitle
                        },
                    };
        }
    }
}
